"use strict";
cc._RF.push(module, 'dc8e97/HMpO2okiw/YJe+38', 'NewScript - 001');
// scripts/NewScript - 001.js

"use strict";

var e = require;
var t = module;
cc.Class({
  "extends": cc.Component,
  properties: {
    speed: 1,
    progressBarView: {
      type: cc.ProgressBar,
      "default": null
    }
  },
  onLoad: function onLoad() {
    this._ping = !0;
    this.progressBarView.progress = 0;
  },
  update: function update(e) {
    this._updateProgressBar(this.progressBarView, e);
  },
  _updateProgressBar: function _updateProgressBar(e, t) {
    var n = e.progress;
    if (n < 1 && this._ping) n += t * this.speed;else {
      n -= t * this.speed;
      this._ping = n <= 0;
    }
    e.progress = n;
  }
});

cc._RF.pop();